@use './variables.scss' as *;

// 全局样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: $font-family;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: $background-color;
}

#root {
  height: 100%;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

// 通用工具类
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: $spacing-sm; }
.mb-2 { margin-bottom: $spacing-md; }
.mb-3 { margin-bottom: $spacing-lg; }
.mb-4 { margin-bottom: $spacing-xl; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: $spacing-sm; }
.mt-2 { margin-top: $spacing-md; }
.mt-3 { margin-top: $spacing-lg; }
.mt-4 { margin-top: $spacing-xl; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: $spacing-sm; }
.ml-2 { margin-left: $spacing-md; }
.ml-3 { margin-left: $spacing-lg; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: $spacing-sm; }
.mr-2 { margin-right: $spacing-md; }
.mr-3 { margin-right: $spacing-lg; }

.p-0 { padding: 0; }
.p-1 { padding: $spacing-sm; }
.p-2 { padding: $spacing-md; }
.p-3 { padding: $spacing-lg; }
.p-4 { padding: $spacing-xl; }

// 响应式隐藏类
.hidden-xs {
  @include responsive(xs) {
    display: none !important;
  }
}

.hidden-sm {
  @include responsive(sm) {
    display: none !important;
  }
}

.hidden-md {
  @include responsive(md) {
    display: none !important;
  }
}

.hidden-lg {
  @include responsive(lg) {
    display: none !important;
  }
}

// 动画类
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

// 状态类
.loading-container {
  @include flex-center;
  min-height: 200px;
}

.empty-container {
  text-align: center;
  padding: $spacing-xxl $spacing-lg;
  color: $text-color-disabled;
}

.error-container {
  text-align: center;
  padding: $spacing-xxl $spacing-lg;
  color: $error-color;
}

// Ant Design 样式覆盖
.ant-layout {
  background: $background-color;
}

.ant-card {
  @include card-style;
}

.ant-btn {
  @include button-style;
}

.ant-input,
.ant-input-password {
  border-radius: $border-radius-base;
}

.ant-select-selector {
  border-radius: $border-radius-base !important;
}

.ant-pagination-item {
  border-radius: $border-radius-base;
}

.ant-tag {
  border-radius: $border-radius-sm;
} 